<%
    String modifyParam = request.getParameter("modify");

    boolean modify = false;
    if (modifyParam != null) {
        modify = true;
    }
%>
<script type="text/javascript" src="js/customer.js"></script>
<div style="display: inline-block;">
    <div id="order-container">
        <div class="order-column">
            <div class="block-header">
                Personal Information
            </div>
            <div class="table-view" style="padding: 10px 20px 10px 0px;">

                <div>First name:</div> 
                <input value="" type="text" required="" id="first-name"  maxlength="40" />

                <div>Last name:</div> 
                <input value="" type="text" required="" id="last-name"  maxlength="40"/>

                <div>Age:</div> 
                <input value="16" type="number" min="16" id="age" />

                <div>Sex:</div> 
                <span style="margin: 0px 25px;">
                    <input type="radio" id="sex" name="sex" value="0" checked="checked"> male
                    <input type="radio" id="sex" name="sex" value="1"> female
                </span>

                <div>Language:</div> 
                <select id="language">
                    <option>English</option>
                    <option>Ukrainian</option>
                    <option>Russian</option>
                </select>

            </div>
        </div>
        <div class="order-column">
            <div class="block-header">
                Location Information
            </div>
            <div class="table-view" style="padding: 10px 20px 10px 0px;">
                <div>Country:</div> 
                <%@include file="countries.html" %>

                <div>State:</div> 
                <input value="" type="text" required="" id="state"   maxlength="40"/>

                <div>City:</div> 
                <input value="" type="text" required="" id="city"  maxlength="50"/>

                <div>Street:</div> 
                <input value="" type="text" required="" id="street"   maxlength="50"/>

                <div>Building number:</div> 
                <input value="" type="text" required="" id="home"  maxlength="10"/>

                <div>Appartment:</div> 
                <input value="" type="text" required="" id="appartment"  maxlength="10"/>

                <div>ZIP Code:</div> 
                <input value="" type="text" required="" id="zip"  maxlength="15"/>
            </div>
        </div>
        <div class="order-column">
            <div class="block-header">
                Contact Information
            </div>
            <div class="table-view" style="padding: 10px 20px 10px 0px;">

                <div>Phone:</div> 
                <input value="" type="text" required="" id="phone"  maxlength="40"/>

                <div>Fax:</div> 
                <input value="" type="text" required="" id="fax"  maxlength="40"/>

                <div>E-mail:</div> 
                <input value="" type="email" required="" id="email"   maxlength="60"/>

                <div>Prefered contact method:</div> 
                <select id="prefered-cont">
                    <option>Phone</option>
                    <option>Fax</option>
                    <option>E-Mail</option>
                </select>
                <br/>

            </div>
        </div>
    </div>
</div>

<div style="text-align: center;">
    <br/>
    <h3>Please check correctness of all information. </h3>
    <%
        if (!modify) {
    %>
    <a href="">
        <input type="button" value="Find customer" id="find-btn" />
    </a>
    <% }%>
    <% String butonValue;
        if (modify) {
            butonValue = "Save";
        } else {
            butonValue = "Add new customer";
        }
    %>
    <input type="button" value="<%= butonValue%>" id="create-btn" />
</div>
<%
    if (!modify) {
%>
<h3 class="block-header">Customers</h3>
<div style="display: inline-block; width: 100%;">
    <div class="box">
        <table class="table" rules=all>
            <tr>
                <td>Name</td>
                <td>Phone</td>
                <td>Address</td>
            </tr>

            <tr>
                <td><a href="index.jsp?content=customer_view">Yaroslav Gyrych</a></td>
                <td>0633289472</td>
                <td>Ukraine, Kyiv, Balzaka Street 58, 02232</td>
            </tr>
        </table>
    </div>
</div>
<% }%>